package teacher.chapter06;


 class Test02 {
    public static void main(String[] args) {
        double angleInDegrees = 180.0;
        double angleInRadians = toRadians(angleInDegrees);
        double angleInDegreesAgain = toDegrees(angleInRadians);

        System.out.println("Angle in degrees: " + angleInDegrees);
        System.out.println("Angle in radians: " + angleInRadians);
        System.out.println("Angle in degrees (again): " + angleInDegreesAgain);
    }

    public static double toRadians(double degrees) {
        return degrees * Math.PI / 180.0;
    }

    public static double toDegrees(double radians) {
        return radians * 180.0 / Math.PI;
    }
}

public class Test01 {
    public static void main(String[] args) {
        double x = 0.1 + 0.2;
        System.out.println("x = " + x);

        double y = 0.3;
        System.out.println("y = " + y);

        double result = x * y;
        System.out.println("result = x * y = " + result);
    }
}

